﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Config
{
    public class Constants
    {
        // Khai báo các Connection String key liên quan đến Solution
        #region ConnectionString Constant
        public const string CONNECTION_STRING_BACKEND = "CONNECTION_STRING_BACKEND";
        public const string CONNECTION_STRING_HILOGAME = "CONNECTION_STRING_HILOGAME";
        public const string CONNECTION_STRING_PAYMENT = "CONNECTION_STRING_PAYMENT";
        #endregion

        #region COOKIE cho Admin
        public const string COOKIE_ADMIN_ID = "ADMIN_ID";
        public const string COOKIE_ADMIN_USERNAME = "ADMIN_USERNAME";
        public const string COOKIE_ADMIN_FULL_NAME = "ADMIN_FULL_NAME";
        public const string COOKIE_ADMIN_PERMISSION = "ADMIN_PERMISSION";
        public const string COOKIE_ADMIN_IP_ADDRESS = "IP_ADDRESS";
        public const string COOKIE_ADMIN_SERVICES_ID = "SERVICES_ID";
        #endregion

        #region Cấu hình cơ bản
        public const string WEB_ROOT = "WEB_ROOT";
        public const string COOKIE_DOMAIN = "COOKIE_DOMAIN";
        public const string COOKIE_EXPIRES = "COOKIE_EXPIRES";
        public const string HILO_REDIS = "HiLoRedis";
        #endregion

        #region Cấu hình cho User        
        public static string COOKIE_USER_ID = "COOKIE_USER_ID";        
        public static string COOKIE_USER_USERNAME = "COOKIE_USER_USERNAME";
        public static string COOKIE_USER_FULL_NAME = "COOKIE_USER_FULL_NAME";
        public static string COOKIE_USER_DISPLAY_NAME = "COOKIE_USER_DISPLAY_NAME";
        public static string COOKIE_USER_IP_ADDRESS = "COOKIE_USER_IP_ADDRESS";
        public static string COOKIE_USER_TYPE = "COOKIE_USER_TYPE";
        public static string COOKIE_USER_Triple7AccessToken = "COOKIE_USER_Triple7AccessToken";
        public static string COOKIE_USER_GoPlayAccessToken = "COOKIE_USER_GoPlayAccessToken";

        #endregion

        #region Kết nối API Go.vn
        public const string CLIENT_ID = "client_Id";
        public const string CLIENT_SECRET = "client_secret";
        public const string SERVICE_APPID = "serviceAppId";
        public const string SERVICE_KEY = "serviceKey";
        public const string MD5_KEY = "md5key";
        public const string MAKER_CODE = "makercode";
        public const string GET_CODE_URL = "get_code_url";
        public const string GET_PROFILE_URL = "get_profile_url";
        public const string GET_ACCESSTOKEN_URL = "get_accesstoken_url";
        public const string GET_BLANCE_URL = "get_balance_url";
        public const string BUYITEMS_URL = "buyitems_url";
        public const string INPUTMONEYBETTING_URL = "inputmoneybetting_url";
        public const string API_ISTEST = "api_isTest";
        #endregion

        #region Kết nối API Go su
        public const string GOSU_CLIENT_ID = "gosu_client_Id";
        public const string GOSU_CLIENT_SECRET = "gosu_client_secret";
        public const string GOSU_SERVICE_APPID = "gosu_serviceAppId";
        public const string GOSU_SERVICE_KEY = "gosu_serviceKey";
        public const string GOSU_RETURN_ACCESSTOKEN_URL = "gosu_return_accesstoken_url";
        public const string GOSU_GRANT_TYPE = "gosu_grant_type";

        //public const string GOSU_MD5_KEY = "gosu_md5key";
        //public const string GOSU_MAKER_CODE = "gosu_makercode";
        
        public const string GOSU_GET_CODE_URL = "gosu_get_code_url";
        public const string GOSU_GET_PROFILE_URL = "gosu_get_profile_url";
        public const string GOSU_GET_ACCESSTOKEN_URL = "gosu_get_accesstoken_url";
        public const string GOSU_GET_BLANCE_URL = "gosu_get_balance_url";
        public const string GOSU_BUYITEMS_URL = "gosu_buyitems_url";
        public const string GOSU_INPUTMONEYBETTING_URL = "gosu_inputmoneybetting_url";
        public const string GOSU_API_ISTEST = "gosu_api_isTest";
        #endregion

    }

    public class LogActionConstants
    {
        /// <summary>
        /// Login
        /// </summary>
        public const char Login = 'L';
        /// <summary>
        /// Thêm mới
        /// </summary>
        public const char Add = 'A';
        /// <summary>
        /// Sửa
        /// </summary>
        public const char Modify = 'M';
        /// <summary>
        /// Xóa
        /// </summary>
        public const char Delete = 'D';
        /// <summary>
        /// Cập nhật trạng thái
        /// </summary>
        public const char ChangeStatus = 'C';
    }
    public enum EnumPermission
    {
        //[ReadOnly][CanAddNew][CanEdit][CanDelete]
        Delete = 1,
        Edit = 2,
        New = 4,
        Read = 8
    }
}
